<template>
    <!--封装player:带有模态框的player播放器组件-->
    <div id="module-player" class="modal" tabindex="-1" role="dialog">
        <div class="modal-dialog" role="document">
            <div class="modal-content">
                <div class="modal-body">
                    <player v-bind:player-i-d="'module-player-div'" ref="player">
                    </player>
                </div>
            </div>
        </div>
    </div>
</template>

<script>
    import Player from "./player";
    export default {
        name: "module-player",
        components: {Player},
        data:function () {
            return{
                //播放器实例
                aliPlayer:{},
            }
        },
        methods:{
            //播放player组件内的url
            playURL(url){
                let _this=this;
                _this.$refs.player.playURL(url);
            },
            //播放player组件内的vod
            playVOD(vod){
                let _this=this;
                //获取授权
                _this.$refs.player.playVOD(vod);
                $("#module-player").modal("show");
            }
        }
    }
</script>

<style scoped>
    /*占满整个模态框:modal-body无边距*/
    #module-player .modal-body{
        padding: 0;
    }
</style>